import requests from "@/utils/request";

export function GetAblum(params) {
  return requests.get("/api/yp/album", { params });
}
export function GetAlbums() {
  return requests.get(`/api/yp/album?current=1&size=${99999}`);
}
// 删除相册
export function DelAlbum(id) {
  return requests.delete(`/api/yp/album/${id}`);
}
// 获取图片列表

export function GetPic(params) {
  return requests.get("/api/yp/upimg", { params });
}
// 添加图片列表
export function CreateAblum(params) {
  return requests.post("/api/yp/album", params);
}
//修改图片相册
export function PutAlbum(id, params) {
  return requests.put(`/api/yp/album/${id}`, params);
}
//修改图片
export function EditUpimg(id, params) {
  return requests.put(`/api/yp/upimg/${id}`, params);
}
//删除图片
export function DelImg(id) {
  return requests.delete(`/api/yp/upimg/${id}`);
}

//添加上传图片
export function PostPic(params) {
  return requests.post(`/api/file/upload`, params);
}


export function getAblum(params){
    return requests.get('/api/yp/album',{params})
}


export function DelPic(id){
   return requests.delete(`/api/yp/upimg/${id}`);
}


// 获取标签
export function getTag(params){
    return requests.get('/api/yp/tag',{params:params})
}
// 删除标签
export function delTag(id){
    return requests.delete('/api/yp/tag/'+id)
}
// 添加标签
export function addTag(data){
    return requests.post('/api/yp/tag',data)
}
// 修改标签
export function changeTag(data){
    return requests.put('/api/yp/tag',data)
}
